Really randomise MAC addresses for multi-VIF guests.
authorkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Tue, 16 Aug 2005 19:38:22 +0000 (19:38 +0000)
committerkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Tue, 16 Aug 2005 19:38:22 +0000 (19:38 +0000)
Reseeding on every VIF doesn;t work as timeofday doesn't
change quickly enough.

Signed-off-by: Jim Dykman <dykman@us.ibm.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
tools/python/xen/xm/create.py

index 72aa2a3f63449b8e0563653a8e508535b3ae2c45..1d37f222edca97cff0168c1a606cba680a61d563 100644 (file)
@@ -380,7 +380,6 @@ def randomMAC():
 
     @return: MAC address string
     """
-    random.seed()
     mac = [ 0xaa, 0x00, 0x00,
             random.randint(0x00, 0x7f),
             random.randint(0x00, 0xff),
@@ -689,6 +688,7 @@ def balloon_out(dom0_min_mem, opts):
     del xc
 
 def main(argv):
+    random.seed()
     opts = gopts
     args = opts.parse(argv)
     if opts.vals.help: